<?php


namespace dsp\command;


use dsp\command\items\ComplexCommand;
use dsp\command\items\SimpleCommand;

class Main extends \kernel\BaseMain
{

    public function execute($choice = 'all')
    {
        $invoker = new Invoker();
        $invoker->setOnStart(new SimpleCommand('Say Hi'));
        $receiver = new Receiver();
        $invoker->setOnFinish(new ComplexCommand($receiver, "Send email", 'Save report'));

        $invoker->doSomethingImportant();
    }
}